# Be sure to restart your server when you modify this file

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.3.8' unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')

#ActionController::Base.session_options[:session_expires] = 1.minute.from_now

Rails::Initializer.run do |config|
  # Settings in config/environments/* take precedence over those specified here.
  # Application configuration should go into files in config/initializers
  # -- all .rb files in that directory are automatically loaded.

  # Add additional load paths for your own custom dirs
  config.load_paths += %W( #{RAILS_ROOT}/extras )

  # Specify gems that this application depends on and have them installed with rake gems:install
  # config.gem "bj"
  # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
  # config.gem "sqlite3-ruby", :lib => "sqlite3"
  # config.gem "aws-s3", :lib => "aws/s3"
  #config.gem 'prawn'

  # Only load the plugins named here, in the order given (default is alphabetical).
  # :all can be used as a placeholder for all plugins not explicitly named
  # config.plugins = [ :exception_notification, :ssl_requirement, :all ]

  # Skip frameworks you're not going to use. To use Rails without a database,
  # you must remove the Active Record framework.
  # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]

  # Activate observers that should always be running
  # config.active_record.observers = :cacher, :garbage_collector, :forum_observer

 # Use the database for sessions instead of the file system
 #(create the session table with 'rake db:session:create')
 # config.action_controller.session_store = :active_record_store


  # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
  # Run "rake -D time" for a list of tasks for finding time zone names.
  #config.time_zone = 'UTC'

  # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
  # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
  config.i18n.default_locale = :cn
  
  #---------------------------------------------------
  #                 定义一些全局变量
  #---------------------------------------------------
  #测试类型
  TEST_TYPE_TREND = "倾向测试"
  TEST_TYPE_MANY_TREND = "复杂倾向测试"
  TEST_TYPE_JUMP = "跳转测试"
  TEST_TYPE_COUNT = "计分测试"
  TEST_TYPE_PROF = "专业测评量表"
  
  #标明一个题目是章节
  QUESTION_MARKER_PART = "part"
  
  #测试状态：上线
  TEST_STATUS_FINISHED = "启用"
  TEST_STATUS_UNFINISHED = "停用"

  #测试计分方式
  TOTAL_METHOD_A = "每项相加"
  TOTAL_METHOD_B = "每项相加"

  #常模因子如何表示
  FACTOR_TYPE_NUM = "数字"
  FACTOR_TYPE_RANGE = "范围"

  #性别
  SEX_MALE = "男"
  SEX_FEMALE = "女"

  #不考虑当前因素（用于常模定义）
  NOT_IMPORT = "不考虑"


  #常模统计项目类型
  NORM_ITEM_TYPE_NUM = "不细分,总体考察"
  NORM_ITEM_TYPE_PART = "子量表"
  NORM_ITEM_TYPE_DIMEN = "维度"

  #计分项目
  TOTAL = "总分"

  #用户信息已经填写完善
  USER_INFO_COMPLETED = "completed"

  #当前登录用户ID和临时账户ID
  CURRENT_USER_ID = "CURRENT_USER_ID"
  CURRENT_TEMPUSER_ID="CURRENT_TEMPUSER_ID"

  #有无常模
  HAS_NORM_YES = "有"
  HAS_NORM_NO = "无"

  #常模类型
  NORM_TYPE_TEXT = "文本常模"
  NORM_TYPE_NUM = "数据常模"

  QUESTION_PAGE_SIZE = 10
  
  #报告重要性importance
  IMPORTANCE_OF_REPORT_A="重要"
  IMPORTANCE_OF_REPORT_C="普通"
end
require 'will_paginate'

#邮件发送配置
ActionMailer::Base.smtp_settings = {
  :enable_starttls_auto => true,
  :address => 'smtp.gmail.com',
  :port => 587,
  :domain => "google.com",
  :authentication => :plain,
  :user_name => 'liuzihua2@gmail.com',
  :password => 'iyaoigogogo',
}
